package com.suny.future;

//import com.com.suny.future.callable.Host;

public class Main {
    public static void main(String[] args) {
        System.out.println("Main BEGIN");
        //引用不同包下的host
        Host host = new Host();

        Data dataA = host.request(10, 'A');
        Data dataB = host.request(20, 'B');
        Data dataC = host.request(30, 'C');

        System.out.println("Main Other Thread Begin");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
        }
        System.out.println("Main Other Thread End");


        System.out.println("dataA = " + dataA.getContent());
        System.out.println("dataB = " + dataB.getContent());
        System.out.println("dataC = " + dataC.getContent());

        System.out.println("Main END");
    }
}
